import {filterObj} from '@/utils/util';
import {deleteAction, downFile, getAction} from '@/api/manage'
import Vue from 'vue'
import {ACCESS_TOKEN} from "@/store/mutation-types"
import JEllipsis from '@/components/jeecg/JEllipsis'

export const flowableMixin = {
  components: {
    JEllipsis
  },
  data(){
    return {
      //token header
      //tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
      customformList: [],
      formQueryParams:{
        pageNum: 1,
        pageSize: 1000,
      },
    }
  },
  created() {
    //this.ListCustomForm();
  },
  computed:{
    /*todo 所有的流程表单，组件化注册，在此维护*/
    allFormComponent:function(){
      return [
        {
          text: '财务审批',
          routeName: '@/views/wflowable/admin/layout/form/financeForm.vue',
          component: () => import(`@/views/wflowable/admin/layout/form/financeForm`),
          businessTable: 'lg_oa_approval'
        },
        {
          text: '外部表单测试',
          routeName: '@/views/wflowable/admin/layout/form/financeForm.vue',
          component: () => import(`@/views/wflowable/admin/layout/form/financeForm`),
          businessTable: 'test'
        },
        {
          text: '测试',
          routeName: '@/views/wflowable/admin/layout/form/testForm.vue',
          component: () => import(`@/views/wflowable/admin/layout/form/testForm`),
          businessTable: 'test'
        },
        
      ]
    }
  },
  methods:{

    getFormComponent(routeName){
      return _.find(this.allFormComponent,{routeName:routeName})||{};
    },
   

  }

}